
// Copyright (c) 2010 Gong Chengming, NARI-TECH

// This program generates a shell script for creating a directory for each user if it has not been created. A hidden file will be added into each newly created directory and all of the newly created directories will be added into the hg lib.  
// Created: Nov. 1, 2010

#include <stdio.h>

const char* NAMES[] = {"ChenFenglei", "ChenRui", "ChenTianhua", "DengDonglin", "DingYonghan", "DongJie", "DuLei", "GeLiangliang", "GongChengming", "GuDongjian", "GuiShuhua", "HuYingjian", "KongQingxiang", "LiHuijun", "LiLei", "LiJiepeng", "LiNan", "LuJuanjuan", "LuoYuchun", "LvXingyue", "PengLong", "ShaoKai", "SunJian", "SunXiaoming", "WangZhongda", "XuLiufei", "XuDawei", "ZhangWenbin", "ZhangYongchao", "ZhaoHuashi", "ZhaoJiangang", "ZhaoZe", "ZhuangXiaolong", "ZeDehu"};

int main(){

  printf("cd ~/sandbox/users\n");

  int n = sizeof(NAMES)/sizeof(NAMES[0]);
  printf("# n = %d\n", n);

  for(int i = 0; i < n; ++i) {
    printf("test -d %s || (mkdir %s; touch %s/.hidden; hg add %s)\n", NAMES[i], NAMES[i], NAMES[i], NAMES[i]);
  }
  return 0;
}
